import { http } from "@/utils/http";
import { baseUrlApi, filerEmptyVal } from "../utils";

/** 列表查询 */
export const getPlatApplyList = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/platform/declaration/page"), {
    params: filerEmptyVal(params)
  });
};

/** 详情 */
export const getPlatApplyDetail = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/platform/declaration/detail"), {
    params: filerEmptyVal(params)
  });
};

/** 新增 */
export const addPlatApply = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/platform/declaration/add"), {
    data: filerEmptyVal(data)
  });
};

/** 审核 */
export const checkPlatApply = (data?: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/platform/declaration/examineStatus"),
    {
      data: filerEmptyVal(data)
    }
  );
};

/** 修改 */
export const upPlatApply = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/platform/declaration/update"), {
    data
  });
};

/** 删除 */
export const delPlatApply = (dataId?: number) => {
  return http.request<any>(
    "post",
    baseUrlApi("/platform/declaration/delete?id=" + dataId)
  );
};
